import java.util.ArrayList;
import java.util.List;

class Series {

    List<Integer> series = new ArrayList<>();

    Series(final String inputString) {
        char[] inputChars = inputString.toCharArray();
        for (int i = 0; i < inputChars.length; i++) {
            this.series.add(inputChars[i] - '0');
        }
    }

    List<Integer> getDigits() {
        return this.series;
    }

    List<List<Integer>> slices(final int i) {
        if (i > this.series.size()){
            throw new IllegalArgumentException();
        }

        List<List<Integer>> result = new ArrayList<>();
        int length = this.series.size() - i;
        for (int j = 0; j <= length; j++) {
            List<Integer> tmp = new ArrayList<>();
            for (int k = 0; k < i; k++) {
                tmp.add(this.series.get(j + k));
            }
            result.add(tmp);
        }

        return result;
    }
}